package com.springsummer.information.green.hello;


import com.springsummer.information.green.annotation.AutoValue;
import com.springsummer.information.green.annotation.Autowired;

public class AutoEmpService {

    @Autowired
    private AutoEmpRepository autoEmpRepository;

    @Autowired
    public AutoPeachService autoPeachService;

    private String empNo="202505039802";

    @AutoValue(value = "hiempa")
    private String empName;

    public String addEmp(String name) {
        System.out.println("AutoEmpService addEmp check name:" + name + " empno:" + empNo+" empNameAutoValue:"+empName);
        String daoResult = "";
        if (autoEmpRepository != null) {
            daoResult = autoEmpRepository.addEmp(name);
        }

        String serviceRes = "HelloEmpService:" + empNo + ":" + daoResult;
        System.out.println(serviceRes);
        if(autoPeachService!=null){
            autoPeachService.helloName(name);
        }
        return serviceRes;
    }




}
